<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
</head>
<body>
<script>
	var Thread = function(callback) {
		this.callback = callback;
	};
	Thread.prototype = {
		start: function() {
			if (this.callback) {
				this.callback.call(this);
			}
		}
	};
</script>
<script>
	var th = new Thread(run);
	th.start();

	function run() {
		console.log("thread is run: ");
	}
</script>
</body>
</html>